# 1  计算器，实现一个三维向量的加法，减法以及向量和标量的乘法和除法运算
class VecCal(object):
    def __init__(self,x=0,y=0,z=0):
        self.X = x
        self.Y = y
        self.Z = z
    def __add__(self,n):
        result = VecCal()
        result.X = self.X + n.X
        result.Y = self.Y + n.Y
        result.Z = self.Z + n.Z
        return result
    def __sub__(self,n):
        result = VecCal()
        result.X = self.X - n.X
        result.Y = self.Y - n.Y
        result.Z = self.Z - n.Z
        return result
    def __mul__(self,n):
        result = VecCal()
        result.X = self.X * n
        result.Y = self.Y * n
        result.Z = self.Z * n
        return result
    def __floordiv__(self,n):
        result = VecCal()
        result.X = self.X // n
        result.Y = self.Y // n
        result.Z = self.Z // n
        return result
    
    def __str__(self):
        return '({0}, {1}, {2})'.format(self.X,self.Y,self.Z)
num1 = VecCal(*map(int,input().split(',')))
num2 = VecCal(*map(int,input().split(',')))
n=int(input())

print(num1,'+',num2,'=',num1+num2)
print(num1,'-',num2,'=',num1-num2)
print(num1,'*',n,'=',num1*n)
if n != 0:
    print(num1,'/',n,'=',num1//n)
else :
    print(num1,'/',n,'=','(0, 0, 0)')

# 2 实现查找优异生的功能——用户输入多个学生的成绩，输出总分最高的学生姓名和各科成绩
class Student(object):
    def __init__(self,name,mscore,cscore,escore):
        self.name = name
        self.mscore = mscore
        self.cscore = cscore
        self.escore = escore
        self.s = mscore + cscore + escore
    def func1(self):
        return self.mscore + self.cscore + self. escore
    def func2(stulist):
        return max(stulist,key = lambda x:x.func1())
    def __str__(self):
        return '{0} {1} {2} {3}'.format(self.name,self.mscore,self.cscore,self.escore)
data = []
data.append(input().split())
for i in range(3):
    data.append(list(map(int,input().split())))
lst = [Student(*[row[i] for row in data]) for i in range(len(data[0]))]
    
print(Student.func2(lst))